test: mass-sensitivity asserts for jax_likelihood median literals - #254
Merged
Conversation
Audit (#253) found 9 vmap literals whose rtol tolerance exceeds the likelihood response to a +5% lens-mass perturbation, and one (imaging/mge_group) with zero response - the median configuration zeroes the source's solved intensities. Each affected script gains a __Mass Sensitivity__ block asserting the perturbed likelihood moves by an audit-calibrated floor; imaging/mge_group additionally anchors its Isothermal near simulator truth (retaining the source) and regenerates its literal. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Audit follow-up to #251/#252 (fixes #253). An audit of every
jax_likelihood/datacubescript found that 10 vmap literals could not detect a source-plane mass regression: perturbing all lens mass parameters by +5% moved the likelihood by less than the literal'srtol=1e-4tolerance (9 scripts), or not at all (imaging/jax_likelihood/mge_group.py, ΔLL ≈ 5e-11 — its median configuration zeroes the source's solved intensities).Human-approved fix pattern — sensitivity asserts, no wholesale literal regeneration:
interferometer/jax_likelihood/+ 2interferometer/datacube/) gain a__Mass Sensitivity__block after their literal: re-evaluate the fitness with every lens mass parameter perturbed +5% and assert |ΔLL| exceeds a per-script floor (audit-measured response ÷ 5, margin for platform drift). Existing literals untouched.imaging/jax_likelihood/mge_group.pyis hard-blind, so no assert can pass on its old model: its mainIsothermalis now anchored near thesimulator/simple.pytruth (einstein_radiusprior median 1.6, centre/ell fixed at truth) — this retains the source (ΔLL now 48.9) — its single literal is regenerated (−29060.215 → −28830.547), and it gets the same assert (floor 9.0).Scripts Changed
All 10 audited-affected scripts; robustly-sensitive scripts untouched. Not covered (follow-up left on #253): the 8
multi_dataset/scripts (audit harness cannot driveFactorGraphModelvmap — unclassified) and 5 non-standard-structure scripts (potential_correction×2,shared_preloads×2,delaunay_near_caustic).Test Plan
PASS: mass-sensitivity floor exceeded.)mge_group.pyre-audited after anchoring: ΔLL 5e-11 → 48.9; new literal generated from the run and confirmed on re-executionHeart gate: RED with the same single unrelated reason (
release validation FAILED (stage integrate)) human-acknowledged for this day's earlier ships; ack covers that reason set only.Generated by the PyAutoLabs agent workflow.